function [rev, i1, i2, i3, rev_annual, mom, mom_skipping, cov12_23, cov12_34,  mom_annual] = buildup_func(A, v_theta, v_3, v_2, v_1, kappa, v_z, psi)

 % Just some preparation:
 
v_F3  = v_theta + v_3;
v_F2 = v_F3+v_2;
v_F1 = v_F2+v_1;

k_theta = (1/kappa)*v_theta;
k_F3 = k_theta+v_3;
k_F2 = k_F3+v_2;
k_F1 = k_F2+v_1;

%Date 3:

rho_3 = k_theta/k_F3;
k_theta_F3 = v_theta - k_theta^2/k_F3;
lambda_3 = A*k_theta_F3;


%Date 2:

rho_2 = k_theta/k_F2;
k_F3_F2 = k_F3 - k_F3^2/k_F2;
lambda_2 = A*(k_theta/k_F3)^2 * k_F3_F2 ;

%Date 1:

rho_1 = k_theta/k_F1;
k_F2_F1 = k_F2 - k_F2^2/k_F1;

lambda_1 = A*(k_theta/k_F2)^2*k_F2_F1  ;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   theta,      F3,          F2       F1       z ,    	 
%   1           2           3       4       5      
vcov   = [...
    v_theta    v_theta 	    v_theta     v_theta     0      ;...
    v_theta    v_F3         v_F3        v_F3        0   ;...
    v_theta    v_F3         v_F2        v_F2        0    ;...
    v_theta    v_F3         v_F2        v_F1        0     ;...
    0          0            0           0           v_z      ];

%   theta,      F3, 		F2      F1      z,    	     
 P1 = [ 0 		0           0       rho_1   (lambda_1+lambda_2*psi+lambda_3*psi^2)  ]';    
 P2 = [ 0       0           rho_2   0       (lambda_2*psi+lambda_3*psi^2) ]';    
 P3 = [ 0    	rho_3     	0 	    0       lambda_3*psi^2 ]';    
 TH = [ 1 		0           0       0       0]';

R1 = P1;
R2 = P2 - P1;
R3 = P3 - P2;
R4 = TH - P3;


rev = ( R1' * vcov * R2 +  R2' * vcov * R3 +  R3' * vcov * R4)/3;

mom  = (R1+R2)' * vcov * (R3 + R4);
mom_skipping = (R1+R2)' * vcov *  R4;

%cov02_23 = (R1+R2)' * vcov *  R3; 
%cov02_34 = (R1+R2)' * vcov *  R4;

%cov01_12 = R1' * vcov *  R2;
%cov01_23 = R1' * vcov *  R3;

cov12_23 = R2' * vcov *  R3;
cov12_34 = R2' * vcov *  R4;


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SD1= (R1' * vcov * R1)^0.5;
SD2= (R2' * vcov * R2)^0.5;
SD3= (R3' * vcov * R3)^0.5;

sf = (2/3.1415927)^0.5;
Y_S = (SD1+SD2+SD3)/3 * sf;

SDM= ((R1+R2)'  * vcov * (R1+R2) )^0.5;
Y_L = SDM *sf;

scalefactor = 0.25*(1/2)^0.5 *8;

rev_annual =  rev/Y_S *scalefactor;

mom_annual   = mom/Y_L/2 *scalefactor;
%mom_skipping_annual = mom_skipping/Y_L *scalefactor;

i1 = R1' * vcov * R3; 
i2 = R2' * vcov * R4;
i3 = R1' * vcov * R4;




